/*
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package interfaces;

import javax.swing.JPanel;

/**
 * A settings panel
 * 
 * 
 */
public interface EditPanel {
   /**
    * Checks the inputs and decides whether the save button should be enabled or not
    */
   void checkInputs();

   /**
    * Deletes the current item
    * 
    * @return true if the deletion succeeds
    */
   boolean delete();

   /**
    * Returns the name of the current item
    * 
    * @return the name of the current item
    */
   String getItemName();

   /**
    * Loads the specified item into the panel and returns the panel
    * 
    * @param item
    * @return the panel
    */
   JPanel load(String item);

   /**
    * Saves the current item
    * 
    * @return true if the save succeeds
    */
   boolean save();
}
